﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BankSystem.Classes
{
    internal class AccountDealingException : Exception
    {
        private string info = "";
        public AccountDealingException(bool isStoreOrWithdraw, bool isAccountOrATM)
        {
            if (isAccountOrATM) info += "ATM机";
            else info += "用户账户";
            if (isStoreOrWithdraw) info += "取钱引发异常";
            else info += "存钱引发异常";
        }

        public override string ToString()
        {
            return info;
        }
    }
}
